package com.net;

import java.io.InputStream;
import java.net.URL;
import java.net.URLConnection;

/**
 * Created by buguniao on 16/3/27.
 */
public class Test1 {
     public static void main(String[] args) throws Exception{
        for(int i=0;i<10000;i++){
            System.out.println("-------->"+i);
            download();

            Thread.sleep(3000);
        }
     }
    public static void download() throws Exception{
        URL url = new URL("http://www.jianshu.com/p/2c78554a3f36");
        URLConnection conn = url.openConnection();

        InputStream in = conn.getInputStream();

        int n=-1;
        while((n=in.read())!=-1){
            //System.out.print((char)n);
        }
    }
}
